home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 8 Mar 1996 13:19:02 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4hq886INN37o@keats.ugrad.cs.ubc.ca>
- References: <00001a73+00002504@msn.com> <313EE686.25CD@lfwc.lockheed.com> <4hnimb$elm@solutions.solon.com> <314021BA.3C57@lfwc.lockheed.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <314021BA.3C57@lfwc.lockheed.com>,
- Ken Garlington <GarlingtonKE@lfwc.lockheed.com> wrote:
- >Peter Seebach wrote:
- >> Ken Garlington <GarlingtonKE@lfwc.lockheed.com> wrote:
- >> >Kazimir Kylheku wrote:
- >> >> The only thing that bitfields are good for, portably, is optimizing the
- >> >> storage of small signed or unsigned integers or flag sets, at some
- >> >> computational expense.
- >>
- >> >Or, for example, implementing standard communications protocols used frequently
- >> >in embedded systems, such as MIL-STD-1553.
- >>
- >> But then that's not "portable" - he did say "portably". Most things like that
- >> can't be done portably anyway, so are not at issue.
- >
- >It can be _extremely_ portable -- between different compilers, between different
- >CPUs, and between different systems. Can you find a case where it won't port?
- >Probably. Nonetheless, it will port quite well in a lot of cases. And since it's
- >a _standard_ protocol, it's worth writing in a portable manner. I don't know
- >whether the C equivalent is portable or not, but I do know that the Ada approach
- >to bitfields can port quite well. Part of that portability, of course, comes from
- >the abilities of the language.
-
- The confusion here stems from a misunderstanding. Peter might be thinking that
- the bitfields are actually made part of protocol messages without external
- representation. What you probably mean is that the implementations of this
- protocol uses bitfield construct in the local representation which are
- encapsulated into an externa form, or perhaps they are only used locally in the
- representation of important data structures.
- --
-
-